  <template>
  <div id="workList">
    <el-table
      :data="tableData"
      border
      style="width: auto"
    >
      <el-table-column
        prop="name"
        label="数据表"
        width="180"
      >
      </el-table-column>
      <el-table-column
        label="操作"
        width="330"
      >
        <template slot-scope="scope">
          <el-select
            v-model="scope.row.value"
            placeholder="请选择"
          >
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
          <el-button
            @click="handleClick(scope.row.value)"
            type="text"
            size="small"
          >操作</el-button>
        </template>

      </el-table-column>

    </el-table>
  </div>
</template>

  <script>
export default {
  data() {
    return {
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
          value: ""
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
          value: ""
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
          value: ""
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
          value: ""
        }
      ],
      options: [
        {
          value: "0",
          label: "表单"
        },
        {
          value: "1",
          label: "列表"
        },
        {
          value: "2",
          label: "关系"
        },
        {
          value: "3",
          label: "配置"
        }
      ],
      value: "0"
    };
  },
  methods: {
    handleClick(a) {
      if (a == "0") {
        this.$router.push("/admin/workForm");
      }
      if (a == 1) {
        this.$router.push("/admin/workDetail");
      }
      if (a == 2) {
        this.$router.push("/admin/workRela");
      }
      if (a == 3) {
        this.$router.push("/admin/workPage");
      }
    }
  }
};
</script>
  <style>
</style>
  